var version;
window.rootPath = (function (src) {
    src = document.scripts[document.scripts.length - 1].src;
    //获取版本号
    version = src.substring(src.lastIndexOf("?v=") + 3, src.length);
    return src.substring(0, src.lastIndexOf("/") + 1);
})();
layui.config({
    base: rootPath + "ext/",
    version: true,
    debug: true
}).extend({
    view: 'index/view',
    admin: 'index/admin',
    setter: 'index/setter',
    index2: 'index/index2',
    drawer: 'soul/drawer',
    myTable: 'my/myTable',
    myTool: 'my/myTool',
    myTree: 'my/myTree',
    myTreeSelect: 'my/myTreeSelect',
    myUpload: 'my/myUpload',
    myMoveUpload: 'my/myMoveUpload',
    myTagInput: 'my/myTagInput',
    myNumber: 'my/myNumber',
    myColor: 'my/myColor',
    myIcon: 'my/myIcon',
    myDragSort: 'my/myDragSort',
    excel: 'soul/excel',
    soulTable: 'soul/soulTable',
    tableMerge: 'soul/tableMerge',
    tableChild: 'soul/tableChild',
    tableFilter: 'soul/tableFilter',
    xmSelect: 'select/xm-select',
    eleTree: 'eletree/eleTree'
});
